package com.dtx.redis.redisDemo;

import redis.clients.jedis.Jedis;

public class RedisDemo {
    public static void main(String[] args) {
        Jedis jedis = new Jedis("127.0.0.1",6379);
        System.out.println("连接成功"); //查看服务是否运行
        System.out.println("服务正在运行: "+jedis.ping());
        System.out.println("===========增加数据===========");
        jedis.set("one","1");
        jedis.set("two","2");
        int i = Integer.valueOf(jedis.get("one")) + Integer.valueOf(jedis.get("two"));
        System.out.println(i);
    }
}
